{% extends 'base.html' %}
{% block title %}
    <title>注册</title>
{% endblock %}

{% block css %}
<style>

</style>
{% endblock %}

{% block js %}
<script>

</script>
{% endblock %}

{% block body %}
 <div class="row">
                <div class="col-sm-6 col-sm-offset-3">
                    <form action="" method="post">
                       {% csrf_token %}
                      <div class="form-group">
                          {{ rgf.username.label_tag }}<span class="text-danger require">*</span>
                          {{ rgf.username }}

                      </div>
                      <div class="form-group">
                          {{ rgf.password.label_tag }}<span class="text-danger require">*</span>
                          {{ rgf.password }}

                      </div>
                      <div class="form-group">
                          {{ rgf.password2.label_tag }}<span class="text-danger require">*</span>
                          {{ rgf.password2 }}

                      </div>
                        <div class="form-group">
                        {% for field in rgf %}
                            {% if field.errors %}
                                {% for e in field.errors %}
                                    <p class="text-danger">{{ e }}</p>
                                {% endfor %}
                            {% endif %}
                        {% endfor %}
                        </div>
                      <button type="submit" class="btn btn-default">注册</button>
                      <button type="button" class="btn btn-default navbar-btn"><a href="{% url 'user:login' %}">去登录</a></button>
                    </form>


                </div>
            </div>

{% endblock %}